package com.ecut.property_project.service.room;

import com.ecut.property_project.mapper.room.RoomHeadMapper;
import com.ecut.property_project.model.room.RoomHead;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RoomHeadService{

    @Resource
    private RoomHeadMapper roomHeadMapper;

    
    public int deleteByPrimaryKey(String roomId) {
        return roomHeadMapper.deleteByPrimaryKey(roomId);
    }

    
    public int insert(RoomHead record) {
        return roomHeadMapper.insert(record);
    }

    
    public int insertSelective(RoomHead record) {
        return roomHeadMapper.insertSelective(record);
    }

    public List<RoomHead> selectAll(){ return roomHeadMapper.selectAll(); }

    public List<RoomHead> selectByPage(Integer page, Integer pageSize){return roomHeadMapper.selectByPage(page,pageSize);}

    public RoomHead selectByPrimaryKey(String roomId) {
        return roomHeadMapper.selectByPrimaryKey(roomId);
    }
    public int getRoomCount(){return roomHeadMapper.getRoomCount();}

    public int getRoomCountByRegion(String region){return roomHeadMapper.getRoomCountByRegion(region);}
    
    public int updateByPrimaryKeySelective(RoomHead record) {
        return roomHeadMapper.updateByPrimaryKeySelective(record);
    }

    
    public int updateByPrimaryKey(RoomHead record) {
        return roomHeadMapper.updateByPrimaryKey(record);
    }

}
